<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers                           |
// |                                                                      |
// | http://www.zen-cart.com/index.php                                    |
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | license@zen-cart.com so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id: faq_manager.php 001 2005-03-27 dave@open-operations.com
//
// only display when more than 1
  if ($faqs_ids->RecordCount() > 1) {
?>
<table border="0" align="left" width="100%">
<?php

    if ($fcPath == '') {
      $fcPath= zen_get_faq_path((int)$_GET['faqs_id']);
    }

    if ($module_show_faq_categories != '0') {

	  $fcPath_new = zen_get_path_faq(zen_get_faqs_faq_category_id((int)$_GET['faqs_id'])); 
	  
	  
      if ((zen_get_faq_categories_image(zen_get_faqs_faq_category_id((int)$_GET['faqs_id']))) !='') {
        switch(true) {
          case ($module_show_faq_categories=='1'):
          $align='left';
          break;
          case ($module_show_faq_categories=='2'):
          $align='center';
          break;
          case ($module_show_faq_categories=='3'):
          $align='right';
          break;
        }
?>
<?php
        if ($module_next_previous !='3') {
?>
  <tr>
    <td colspan="3" align="<?php echo $align; ?>">
      <?php echo '<a href="' . zen_href_link(FILENAME_FAQ, $fcPath_new, 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . zen_get_faq_categories_image(zen_get_faqs_faq_category_id((int)$_GET['faqs_id'])),zen_get_faq_categories_name(zen_get_faqs_faq_category_id((int)$_GET['faqs_id']), $_SESSION['languages_id']),HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT, ' align="middle"') . '</a>'; ?>
      <?php echo '<a href="' . zen_href_link(FILENAME_FAQ, $fcPath_new, 'NONSSL') . '">' . zen_get_faq_categories_name(zen_get_faqs_faq_category_id((int)$_GET['faqs_id']), $_SESSION['languages_id']) . '</a>'; ?>
    </td>
  </tr>
<?php
        } // don't show when top and bottom
?>
<?php
      }
    }
?>
  <tr>
    <td align="center" class="smallText" colspan="3"><?php echo (PREV_NEXT_FAQ); ?><?php echo ($position+1 . "/" . $counter); ?></td>
  </tr>
  <tr>
    <td align="center" valign="bottom" class="main"><a href="<?php echo zen_href_link(zen_get_info_faq_page($previous), "fcPath=$fcPath&faqs_id=$previous"); ?>"><?php echo $previous_image . $previous_button; ?></a> </td>
    <td align="center" class="main"><a href="<?php echo zen_href_link(FILENAME_FAQS, "fcPath=$fcPath"); ?>"> <?php echo zen_image_button(BUTTON_IMAGE_RETURN_TO_OO_LIST, BUTTON_RETURN_TO_OO_LIST_ALT); ?></a> </td>
    <td align="center" valign="bottom" class="main"><a href="<?php echo zen_href_link(zen_get_info_faq_page($next_item), "fcPath=$fcPath&faqs_id=$next_item"); ?>"> <?php echo $next_item_image . $next_item_button; ?></a></td>
  </tr>
</table>
<?php
  }
?>